- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 937
 
          fix(test): replace Collection|iterable with Collection and add appropriate PHPDoc tags
          #7303
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
0e63fe2    to
    b890688      
    Compare
  
    0062175    to
    d4eb6d4      
    Compare
  
    | 
           ci is all red probably due to this change  | 
    
7fe03c9    to
    d35038a      
    Compare
  
    
          
 @VincentLanglet @soyuka At some points both  Otherwise I have this strange failure in Behat checks but I only edited fixtures files (entities & documents), any idea?  | 
    
          
 I feel like it's really hacky and kinda a code smell to have an "addFoo" method which does nothing when the property is an iterable. Ok it's "only for tests files" but it could still lead to some weird error in the futur, and adding such hack just to fix a phpstan baseline error might not be worth it. 
 It could be more insteresting to use the first fix you use (Collection everywhere) and understand the behat failure. I can only take a look starting next week since i'm currently one vacation without a computer.  | 
    
          
 Ok thanks @VincentLanglet , I will revert to Collection everywhere, but probably we'll need to adapt some parts which uses iterables at some parts.  | 
    
          
 Sure, ping me when it's done ; I'll try to help  | 
    
          
 Yes, thanks, I will tomorrow  | 
    
…propriate PHPDoc tags Fixes several phpstan errors ignored in the config
d35038a    to
    bee750e      
    Compare
  
    | 
           @VincentLanglet it's ready and PHPStan is green  | 
    
| 
           @vinceAmstoutz with such commit it might be easier You get logs like but I didn't fully solve this yet... maybe you'll get a better understanding than me ?  | 
    
          
 @VincentLanglet  Thanks for your help! What do you think, should we modify the tests to better comply with code quality rules and so separate usage from Collection and iterable using various independent fixtures?  | 
    
          
 What I don't understand is why the conversion is not done from array to Collection here but when I use something like in my tests, projectInvitations are correctly transformed to a Collection of ProjectInvitation... Maybe it's because it lacks of methods and we should have both  
 If we don't find how to always work with a Collection, maybe we could modify the few fixtures where array is used to something like  | 
    
          
 @VincentLanglet Sorry for the delay. I will check this in the next few weeks and let you know.  | 
    

mainFixes several phpstan errors ignored in the config